[ Home | Prev | Next ]

Chapter 7: continued


Dynamic "Object" Menus

Each of Frontier's object editing windows has a companion menu. These menus are sometimes referred to as "modal" menus since they depend on the current mode or context. An agent script checks the type of the frontmost window and displays the appropriate menu. The script that does the work is suites.modes.monitor, it is called by system.agents.statusMessage. If agents are disabled, the dynamic menu behavior will not work. The menus are covered next, the editing windows at the end of the chapter.

Outline Menu

Whenever an outline object's window is frontmost in Frontier, a menu labeled Outline appears to the left of the Window menu. The Outline menu is shown in Figure 7-26.


Figure 7-26. Outline Menu

Full Expand (Cmd-*) and Full Collapse change your view of an outline's contents. The former opens all levels of sub-headings of every summit in the document. The latter collapses headings so that only summits are visible.

Toggle Expand, or Command-comma, switches between expanded and collapsed views on the selected heading. Collapse to Parent hides the currently selected heading and "sibling" headings, collapsing them under the next higher level heading in the outline. Figure 7-27 shows a sample outline fully expanded.


Figure 7-27. Sample Outline, Fully Expanded

In Figure 7-28, we positioned the bar cursor on Subhead 1, Summit, and chose Toggle Expand from the Outline menu. Notice that the selected heading's sub-headings are all collapsed under it. In Figure 7-29, we chose Toggle Expand again. Notice that only the next level headings are expanded under Subhead 1, Summit. (Some outliners have a command to completely expand the current heading. Because Frontier's outliner is fully scriptable, this feature is easy to add. Create a new menu item, type "op.expand(infinity)" and give it a command key if you like.)


Figure 7-28. Sample Outline With Sub-Heading Collapsed


Figure 7-29. Toggle Expand Opens Next Level of Headings

Make First and Make Last rearrange headings at the same level, i.e. that are children of the same parent. In Figure 7-30, for example, we selected Subhead 1, Summit, which was the first sub-heading under the summit, and chose Make Last from the Outline menu to relocate it.


Figure 7-30. Example of Use of Make Last in Outline

Delete All Subs deletes all sub-headings that are subordinate to the selected heading.

Promote and Demote increase and decrease, respectively, the levels of the headings immediately subordinate to the selected heading. Figure 7-31 shows the sample outline we are working with (shown in its original form in Figure 7-27) after we positioned the bar cursor on the headline Subhead 1, Summit and then chose Promote. Note that the three sub-headings that were formerly subordinate to the selected heading are now at the same level as their former parent. Demoting headings has the opposite effect.


Figure 7-31. Demonstration of Promote in Use

Sort arranges the selected heading and all of its siblings in alphabetical order. The order of sub-headings under siblings is not affected.

Contents Page | Previous Section | Next Section -- Script Menu
HTML formatting by Steven Noreyko January 1996, User Guide revised by UserLand June 1996